<template>
  <div class="app-container">
    <el-tabs v-model="currentTabName" @tab-click="handleClick">
      <el-tab-pane label="英雄统计" name="Hero">
        <Hero v-if="currentTabName === 'Hero'" />
      </el-tab-pane>
      <el-tab-pane label="上阵英雄" name="Log">
        <Log v-if="currentTabName === 'Log'" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import checkPermission from '@/utils/permission'
import Hero from './hero/hero'
import Log from './hero/log'

export default {
  name: 'ActivityCard',
  components: { Log, Hero },
  data() {
    return {
      permissionRoles: this.$store.state.user.permissionRoles,
      currentTabName: 'Hero'
    }
  },
  methods: {
    checkPermission,
    handleClick(tab, event) {
      console.log(tab, event)
    }
  }
}
</script>
